package acwing._2LanQiao._8NumberTheory;
/**
 * @Project : AlgorithmLearning
 * @Package : ACWing._2LanQiao._8numberTheory
 * @File : Q1295.java
 * @Author : WangRuoyu
 * @Date : 2023/3/21 14:30
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Q1295 {

    static long factorial(int x) {
        if (x == 0 || x == 1) {
            return 1;
        }
        long res = 1;
        for (int i = 2; i <= x; ++i) {
            res *= i;
        }
        return res;
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();

        for (int i = 0; i < 15; ++i) {
            System.out.println(i + " " + factorial(i));
        }

        while (line != null) {
            int x = Integer.parseInt(line);

            ArrayList<Integer> list = new ArrayList<>();

            for (int i = 2; i <= x / i; ++i) {
                if (x % i == 0) {
                    list.add(0);
                    while (x % i == 0) {
                        list.set(list.size() - 1, list.get(list.size() - 1) + 1);
                        x /= i;
                    }
                }
            }

            if (x != 1) list.add(1);

            int cnt = 0;
            long div = 1;
            for (int i = 0; i < list.size(); ++i) {
                div *= factorial(list.get(i));
                cnt += list.get(i);
            }

            System.out.println(cnt + " " + (factorial(cnt) / div));

            line = br.readLine();
        }
    }
}